<template>
  <div class="live">
    <div class="item">
      <div class="avatar">
        <div class="img">
          <img src="/img/live/mv2.jpg" alt="jpg" />
        </div>
        <div class="name">Miss小梦吖</div>
      </div>
      <div class="info">
        <div class="live_info">
          <div class="dot"></div>
          <div class="font">直播中</div>
          <div class="num">3.3w</div>
        </div>
        <div class="live_title">清仓大甩卖，小播一会儿</div>
        <div class="commodity">
          <img src="/img/live/sp.png" alt="png">
        </div>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {};
  },
};
</script>
<style lang="scss" scoped>
.live {
  min-height: 100%;
  padding: 0 10px;
  background-color: #fff;
  padding-top: 40px;
}
.item {
  border-radius: 4px;
  background: url("/public/img/live/mv.jpg") no-repeat no-repeat;
  background-size: cover;
  height: 200px;
  position: relative;
  .avatar {
    position: absolute;
    top: -34px;
    left: 15px;
    display: flex;
    align-items: center;
    .img {
      width: 47px;
      height: 47px;
      border-radius: 50%;
      overflow: hidden;
      margin-right: 10px;
    }
    img {
      width: 100%;
      height: 100%;
      // transform: scale(0.5) translate(-50%, -50%);
    }
    .name {
      color: #333;
      font-size: 14px;
    }
  }
  .info {
    position: absolute;
    bottom: 10px;
    left: 15px;
  }
  .live_info {
    padding: 5px;
    width: fit-content;
    display: flex;
    align-items: center;
    border-radius: 2px;
    background-color: rgba(161, 168, 165, 0.6);
    margin-bottom: 10px;
    @keyframes fadeOut {
      from {
        opacity: 1;
      } /* 动画开始时的状态 */
      to {
        opacity: 0;
      } /* 动画结束时的状态 */
    }
    .dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background-color: red;
      animation: fadeOut 2s infinite;
    }
    .font,
    .num {
      font-size: 12px;
      color: #fff;
    }
    .font {
      margin-left: 4px;
      margin-right: 8px;
    }
  }
  .live_title{
    font-size: 16px;
    color: #fff;
    margin-bottom: 10px;
  }
}
</style>